<!DOCTYPE html>
<html>
<head>
    <title>2^n Binary, Hexadecimal, and Decimal Table</title>
    <style>
        table {
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid black;
            padding: 5px;
        }
    </style>
</head>
<body>
    <table>
        <tr>
            <th>n</th>
            <th>Binary</th>
            <th>Hexadecimal</th>
            <th>Decimal</th>
        </tr>
        <script>
            for (let n = 1; n <= 9; n++) {
                const value = Math.pow(2, n);
                const binary = value.toString(2);
                const hexadecimal = value.toString(16);
                const decimal = value.toString(10);
                
                document.write(`
                    <tr>
                        <td>${n}</td>
                        <td>${binary}</td>
                        <td>${hexadecimal}</td>
                        <td>${decimal}</td>
                    </tr>
                `);
            }
        </script>
    </table>
</body>
</html>
